package com.example.property.entity

import com.blankj.utilcode.util.GsonUtils
import com.example.network.BaseResponse
import com.google.gson.JsonArray
import org.json.JSONArray

data class ParkApplyResultEntity(
    val msg: String,
    val statuesCode: String,
    val values: String,
):BaseResponse(){
    fun getValues():List<ParkApplyValues>{
        var list = mutableListOf<ParkApplyValues>()
        var jsonArray =JSONArray(values)
        for (i in 0  until  jsonArray.length()) {
            list.add(GsonUtils.fromJson(jsonArray[i].toString(), ParkApplyValues::class.java))
        }
        return list
    }
}

data class ParkApplyValues(
    var type: Int,
    var state: Int,
    var applyTime: String,
    var title: String,
    var visitorId: Int,
    var parkId: Int,
    var repairId: Int,
    var color: Int,
)
